<?
namespace Admin\Controller
{
    class Upload extends \Api\Controller
    {
        public function indexAction(array $param = array())
        {
            \Api\Redirect::CreateRedirect('admin','index');
        }
        
        public function __initLayout()
        {            
            $this->layout = null;
        }
        
        /**
         * Upload action
         */
        public function thumbnailAction(array $param = array())
        {
            // string $param[0]  - image path
            $data = \Api\Image::UploadToTemp('thumbnail'); 
            
            echo json_encode($data);
        }
    }
}
?>